Different file system types may have different directory entries. The
_d_i_r_e_n_t structure defines a file system independent directory entry, which
contains information common to directory entries in different file system
types. A set of these structures is returned by the _g_e_t_d_e_n_t_s(2) system
call.
The _d_i_r_e_n_t structure is defined below.
struct dirent {
ino_t d_ino;
off_t d_off;
unsigned short d_reclen;
char d_name[1];
};
The dddd____iiiinnnnoooo is a number which is unique for each file in the file system.
The field dddd____ooooffffffff is an opaque offset (i.e., not necessarily in bytes) of
the next directory entry in the actual file system directory. The field
dddd____nnnnaaaammmmeeee is the beginning of the character array giving the name of the
directory entry. This name is null terminated and may have at most
MMMMAAAAXXXXNNNNAAAAMMMMLLLLEEEENNNN characters. This results in file system independent directory
entries being variable length entities. The value of dddd____rrrreeeecccclllleeeennnn is the
record length of this entry. This length is defined to be the number of
bytes between the current entry and the next one, so that it will always
result in the next entry being properly aligned.
The _d_i_r_e_n_t_6_4 structure differs from the _d_i_r_e_n_t structure in the types of
the dddd____iiiinnnnoooo and dddd____ooooffffffff fields. dddd____iiiinnnnoooo is a iiiinnnnoooo66664444____tttt and dddd____ooooffffffff is an ooooffffffff66664444____tttt.
The _d_i_r_e_n_t_6_4 structure is used with the _g_e_t_d_e_n_t_s_6_4, _n_g_e_t_d_e_n_t_s_6_4,
_r_e_a_d_d_i_r_6_4, _t_e_l_l_d_i_r_6_4, and _s_e_e_k_d_i_r_6_4 calls.